home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / util / wb / background.lha / BackgroundV2.1 / Docs / Backprefs.doc.English < prev    next >
Text File  |  1997-04-09  |  19KB  |  531 lines

  1. ›1m                              Backprefs›0m
  2.  
  3. ›1mBackground preferences editor›0m
  4.                              Backprefs v2.1
  5.  
  6. Backprefs and this text are Copyright ©1996 Roland Haas
  7.  
  8.  
  9. Contents:
  10.  
  11.    ›3mDisclaimer›0m
  12.    ›3mKnown bugs›0m
  13.    ›3mHistory›0m
  14.    ›3mFuture›0m
  15.    ›3mAuthor›0m
  16.  
  17.    ›3mWhich pictures›0m
  18.    ›3mThe gadgets›0m
  19.    ›3mThe menus›0m
  20.  
  21.  
  22. ›1mCopyright, copying ...›0m
  23.  
  24. Copying
  25.  
  26. Backprefs may be distributed freely, as long as the contents of the archive
  27. remains unchanged. No charge may be raised other then a small fee for
  28. copying.
  29.  
  30. Backprefs may be sold with other free redistributable software, as long as the
  31. conditions above are satisfied. This program may only be included in a
  32. commercial package if you have the written permission of the `author.
  33.  
  34. disclaimer
  35.  
  36. This product is sold "AS IS" without representation or warranty of any kind,
  37. either expressed or implied.
  38.               YOU USE THIS PROGRAM ON YOUR OWN RISK
  39.  
  40.      INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
  41.      NO WARRANTIES ARE MADE.  ALL USE IS AT YOUR OWN RISK.  NO LIABILITY
  42.      OR RESPONSIBILITY IS ASSUMED.
  43.  
  44. Installer and Installer project icon
  45. (c) Copyright 1995-96 Escom AG. All Rights Reserved.
  46. Reproduced and distributed under license from escom AG.
  47.  
  48.  
  49. ›1m Fehler›0m
  50.  
  51. Currently no bugs are known to me.
  52.  
  53.  
  54. ›1mVersions until today›0m
  55.  
  56. NOTE: The version numbering starts at version 2.0. This program always gets
  57.     the same version number as th main program background. Using programs
  58.     with different version numbers will probably crash the machine.
  59.  
  60.    03.08.1996: V2.0 initial version
  61.    08.04.1997: V2.1 color adaption
  62.  
  63. ›1mPlanned features›0m
  64.  
  65.    · Supporting parameters
  66.    · slider in preview window
  67.  
  68. Suggestions, bug reports to the ›3mAuthor›0m
  69.  
  70. ›1mThis is me›0m
  71.  
  72. Backprefs was coded during long nights by:
  73.  
  74.    Roland Haas
  75.    Mühlweg 16
  76.    77948 Friesenheim
  77.  
  78.    phone: ++49 07821/68084
  79.  
  80. the GUI was created with GadToolsBox v2.0.
  81.  
  82. Suggestion, gifts and  post cards are always welcome!
  83. A new and better version of this text would be especially welcome. Perhaps
  84. even a translation???
  85.  
  86.  
  87. ›1mWhich pictures can be used?›0m
  88.  
  89. Only pictures in the IFF-ILBM format can be loaded. The pictures _must_ use
  90. the same palette as the workbench. The pictures should have the same aspect
  91. ratio. E.g. if your workbench is HIRES/INTERLACED the picture should use the
  92. same viewmode or LORES/NONLACE. Always keep in mind that the pictures
  93. remain in memory; a 640x320 sized picture using eight colors will occupy
  94. 640*320*3/8 = 76800 byte CHIP-RAM. Also pictures must be loaded at program
  95. startup; if you are using many big pictures, this can take several seconds.
  96. So better use few little pictures setting the ›3mTILE flag›0m than many bigger
  97. ones. Starting with V2.1 you can ›3mload›0m pictures later, but this takes of
  98. course some time.
  99.  
  100.  
  101. ›1mBackground preferences›0m
  102.  
  103.                                                     ›3mLoaded Pictures:›0m
  104.           +---------------------------------+ +-+ +-----------------+-+
  105.  ›3m   Name ›0m | Work:Pictures/Disc              | |›3m?›0m| | Back1           |#|
  106.           +---------------------------------+ +-+ | Romantique      |#|
  107.           +---------------------------------+     | Disc            |#|
  108.  ›3mPattern ›0m | "(#? full, #? free              |     | Desert          |#|
  109.           +---------------------------------+     |                 |^|
  110.           +---------------------------------+     |                 |V|
  111.  ›3m   Task ›0m | WORKBENCH                       |     +-----------------+-+
  112.           +---------------------------------+     | Disc              |
  113.           +------------+                          +----+----+----+----+
  114.           |›3m    View    ›0m|                          |›3mAdd ›0m|›3mDel ›0m|›3m Up ›0m|›3mDown›0m|
  115.           +------------+                          +----+----+----+----+
  116.           +------------ ›3mInformation›0m ------------+                   +-+
  117.           |             Picture  Workbench      |     ›3mTile picture:›0m |V|
  118.           |                                     |                   +-+
  119.           |     Size:   96 x 96  640 x 256      |                   +-+
  120.           |                                     |  ›3mScreen picture:›0m  | |
  121.           |     Planes:   3         3           |                   +-+
  122.           |                                     |                   +-+
  123.           |     Aspect: 10 : 22  22 : 44        |    ›3mDelay loading:›0m | |
  124.           +-------------------------------------+                   +-+
  125.  
  126.   +------------+                +------------+                   +------------+
  127.   |›3m    Save    ›0m|                |›3m     Use    ›0m|                   |›3m   Cancel   ›0m|
  128.   +------------+                +------------+                   +------------+
  129.  
  130.  
  131. ›1mThe 'Name' gadget›0m
  132.  
  133. You enter the path to the picture here. The button ›3mbeside›0m opens a
  134. filerequester for doing the same job. The last part of the path appears in
  135. the ›3mlist of pictures›0m.
  136.  
  137.  
  138. ›1mThe 'Pattern' gadget›0m
  139.  
  140. Here you can enter the pattern, which is to use for this window. Windows,
  141. whose titles match the pattern will use this picture as their background
  142. pattern.
  143. Examples:
  144.  
  145.    "#? full, #? free, #? in use" - matches all discs
  146.    (3D|DPAINT|XiPaint)           - matches the drawers 3D, DPaint and
  147.                                    XiPaint
  148.  
  149. Possible tokens:
  150.  
  151.         ?       Matches a single character.
  152.         #       Matches the following expression 0 or more times.
  153.         (ab|cd) Matches any one of the items separated by '|'.
  154.         ~       Negates the following expression.  It matches all strings
  155.                 that do not match the expression (aka ~(foo) matches all
  156.                 strings that are not exactly "foo").
  157.         [abc]   Character class: matches any of the characters in the class.
  158.         [~bc]   Character class: matches any of the characters not in the
  159.                 class.
  160.         a-z     Character range (only within character classes).
  161.         %       Matches 0 characters always (useful in "(foo|bar|%)").
  162.  
  163.  
  164. ›1mThe 'Task' gadget›0m
  165.  
  166. Here you can enter the task pattern, which is to use for this window. Tasks,
  167. whose names match the pattern will use this picture as a background pattern
  168. for their windows.
  169. Examples:
  170.  
  171.    WORKBENCH            - only matches the Workbench task
  172.    #?DeliTracker#?       - the famous DeliTracker
  173.  
  174. Note the two '#?'s surounding the pattern. They are quite usefull, since
  175. 'DeliTracker' may become 'dh0:Tools/DeliTracker' when started from CLI.
  176.  
  177. Possible tokens:
  178.  
  179.         ?       Matches a single character.
  180.         #       Matches the following expression 0 or more times.
  181.         (ab|cd) Matches any one of the items separated by '|'.
  182.         ~       Negates the following expression.  It matches all strings
  183.                 that do not match the expression (aka ~(foo) matches all
  184.                 strings that are not exactly "foo").
  185.         [abc]   Character class: matches any of the characters in the class.
  186.         [~bc]   Character class: matches any of the characters not in the
  187.                 class.
  188.         a-z     Character range (only within character classes).
  189.         %       Matches 0 characters always (useful in "(foo|bar|%)").
  190.  
  191.  
  192. ›1mThe TILE flag›0m
  193.  
  194. The gadget 'Tile Picture' sets or clears the Tile flag of the ›3mactive›0m
  195. picture. By setting this flag the picture will be tiled to cover the whole
  196. area. Otherwise the remaining areas would be cleared with color 0 (grey).
  197. For this flag to work well, the ›3medges of the picture must fit together›0m.
  198.  
  199.  
  200. ›1mThe Screen flag›0m
  201.  
  202. The gadget 'Screen Picture' sets or clears the screen flag of the ›3mactive›0m
  203. picture. If this flag is set, the picture can be used to fill the blank
  204. area on screens. The ›3mpattern›0m is used to tell which screen should use the
  205. picture. To match the Workbench screen you must use the following:
  206.  
  207.    Pattern: "Workbench Screen"
  208.       Task: "WORKBENCH"
  209.  ScreenPic: set
  210.  
  211.  
  212. ›1mDelay loading›0m
  213.  
  214. The gadget 'Delay loading' determines when the picture is loaded. If it is
  215. set, then the picture is loaded when it is used for the first time. If
  216. there is some memory needed later, this picture may be freed again to get
  217. unused memory free. If you plan to use many pictures, you should set this
  218. flags for those, that are rarely used. Background will need lots of time to
  219. load them at startup otherwise.
  220.  
  221.  
  222. ›1mThe floppy symbol›0m
  223.  
  224. This gadget will open a filerequester allowing you to select a picture. The
  225. path appears then in the ›3mstring gadget›0m beside and in the ›3mlist of pictures›0m.
  226.  
  227.  
  228. ›1mThe list of pictures›0m
  229.  
  230. In the right part of the  window all currently loaded pictures are shown in
  231. a listview. The active picture is shown below the list. ›3mPath›0m, ›3mwindow pattern›0m,
  232. ›3mtask pattern›0m and other ›3mproperties›0m can be change using the remaining gadgets.
  233.  
  234.  
  235. ›1mThe 'Add' gadget›0m
  236.  
  237. The Add gadget will create a new ›3mentry›0m for a picture. ›3mPath›0m and ›3mpattern›0m are
  238. taken from the corresponding stringgadgets. The ›3mtype›0m of the new picture is
  239. set to 'Normal', the ›3mTILE flag›0m is also set. The new picture is either added
  240. just after the ›3mactive picture›0m or at the end of the l›3mList of pictures›0m.
  241.  
  242.  
  243. ›1mThe 'Delete' gadget›0m
  244.  
  245. The Delete gadget removes the ›3mactive picture›0m from the ›3mlist of pictures›0m;
  246. however string gadgets remain untouched. So if you have by mistake deleted
  247. the wrong picture, regain it using the ›3mAdd›0m gadget beside.
  248.  
  249.  
  250. ›1mThe 'Up' gadget›0m
  251.  
  252. The Up gadget moves the ›3mactive picture›0m one position up.
  253. If two pictures match the same window the one later in the ›3mlist›0m will be
  254. used. So the picture with the '#?' pattern should be on top of the ›3mlist›0m.
  255.  
  256.  
  257. ›1mThe 'Down' gadget›0m
  258.  
  259. The Down gadget moves the ›3mactive picture›0m one position down.
  260. If two pictures match the same window the one later in the ›3mlist›0m will be
  261. used. So there should only pictures at the end of the list that do only
  262. match one window and especially no one with a '#?' ›3mpattern›0m.
  263.  
  264.  
  265. ›1mThe 'View' gadget›0m
  266.  
  267. Selecting View will open a window in which you can see the ›3mactive picture ›0m
  268. like you would see it in an workbench window. To make changes (e.g. the
  269. ›3mTILE flag›0m) take effect you will have to select the gadget again.
  270.  
  271.  
  272. ›1mThe 'Save' gadget›0m
  273.  
  274. Save quits the editor, loads the pictures and saves the list so it is be
  275. used after a reboot.
  276.  
  277.  
  278. ›1mThe 'Use' gadget›0m
  279.  
  280. Use quits the editor, loads the new pictures and saves the list until the
  281. next reboot.
  282.  
  283. ›1mThe 'Cancel' gadget›0m
  284.  
  285. Cancel quits the editor without saving the list.
  286.  
  287.  
  288. ›1mGiven informations›0m
  289.  
  290. In this field information about size, aspect ratio and depth of the picture
  291. and your workbench are given. Size shows you (surprise, surprise) the Size
  292. of the picture or the workbench in pixels. Pictures that are bigger than
  293. your workbench will never be shown entirely. The number of colors is
  294. computed as follows:
  295.    2^number of bitplanes
  296. So if you are using 3 bitplanes you can choose from eight colors. A picture
  297. using more colors than the workbench will probably look weird. Because of
  298. this you should always choose pictures having as many as or less colors
  299. than your workbench. The last value Aspect shows the ratio of height to
  300. width. Workbench and picture should have the same ratio; otherwise
  301. distortion will occur.
  302.  
  303. ›3mWhich pictures can be used?›0m
  304.  
  305. ›1mThe menus›0m
  306.  
  307. The menus are the same as the ones of the system preferences editors, so
  308. you can also look their functions up in your system manual, if you don't
  309. understand something.
  310.  
  311.    Project        Edit                 Picture             Settings
  312.     ›3mOpen ...›0m       ›3mReset To Defaults›0m    ›3mCompute Colors›0m       ›3mSave Icons?›0m
  313.     ›3mSave As ...›0m    ›3mLast Saved›0m           ›3mDither›0m               ›3mQuantization >>›0m
  314.     ›3mAbout ...›0m      ›3mRestore›0m              ›3mLock Colors ...›0m        ›3mMedian Cut›0m
  315.     ›3mQuit›0m                                ›3mChange Colors ...›0m      ›3mCustom›0m
  316.                                         ›3mLoad Colors ...›0m
  317.                                         ›3mSave Selected ...›0m
  318.  
  319.  
  320. ›1mProject/Open›0m
  321.  
  322. Loads a list of pictures from a file.
  323.  
  324.  
  325. ›1mProject/Save As›0m
  326.  
  327. Lets you save the current list of pictures into a file. A file requester
  328. opens up showing Sys:Prefs/Presets as the default destination. If ›3mSave ›0m
  329. ›3mIcons?›0m is selected then an icon will be created to. Other than the system
  330. editors you can't load the list by double clicking on the icon. Instead you
  331. will have to use ›3mProject/Open›0m to load the list.
  332.  
  333.  
  334. ›1mProject/About›0m
  335.  
  336. This menu item shows information about the program. (›3mVersion, address of›0m
  337. ›3mauthors, utilities...›0m)
  338.  
  339.  
  340. ›1mProject/Quit›0m
  341.  
  342. Quits the editor without saving the list of pictures. This option has the same
  343. effect as ›3mCancel›0m.
  344.  
  345.  
  346. ›1mEdit/Reset To Defaults›0m
  347.  
  348. Clears the list of pictures. That means the patterns defined in WBPATTERN
  349. will be used.
  350.  
  351.  
  352. ›1mEdit/LastSaved›0m
  353.  
  354. Loads the last settings that were saved using ›3mSave›0m.
  355.  
  356.  
  357. ›1m Restore›0m
  358.  
  359. Resets the settings to the ones preset at program startup.
  360.  
  361.  
  362. ›1mPicture/Compute Colors›0m
  363.  
  364. Trys to find colors that match for all pictures in the ›3mlist›0m. There are two
  365. different methods for doing this. ›3mMedian Cut›0m is a procedure apadted from
  366. Paul S. Heckbert. ›3mCustom›0m is something created by me. In contrast to ›3mMedian›0m
  367. ›3mCut›0m colors can be ›3mlocked›0m, so that they won't be changed.
  368. But I really don't know if it is very fast or good. If somebody knows
  369. something about such things, he may look at the ›3malgorithm›0m and send his
  370. opinion to ›3mme.›0m
  371.  
  372.  
  373. ›1m Algo›0m
  374.  
  375.    1. Step: All colors that are used in the pictures are counted
  376.    2. Step: the colors are sorted into the available color pots. If there
  377.             is no free one, the two, which are the most similar to each
  378.             other, are combined taking the new color into account.
  379.    3. Step: Finally the color for every pot is calculated by summing up all
  380.             color values calculating the average of them.
  381.  
  382. the first and the last step are ok, so here's the source for the second
  383. step:
  384.  
  385.          /* ColourCount contains the number of used colours */
  386.  
  387.       for( i = ColourCount ; i > 0 ; i--)
  388.       {
  389.  
  390.             /* Search for some free pot */
  391.  
  392.          NewPot = NULL;
  393.          for(j = NumColours ; j > 0 ; j--)
  394.          {
  395.                                          /* The pot is still empty
  396.                                           * (locked colors have a 1)
  397.                                           */
  398.             if (Pot[j] . NumPixels == 0)
  399.             {
  400.                NewPot = &Pot[j];
  401.                break;
  402.             }
  403.          }
  404.  
  405.          if(NewPot != NULL) /* we have found a free one */
  406.          {
  407.             /* sRed, sGreen, sBlue contained the summed up color values
  408.                Red, Green, Blue the real ones
  409.             */
  410.  
  411.             NewPot -> NumPixels = ColourTable[i-1] . NumPixels;
  412.             NewPot -> Red   = NewPot -> sRed   = ColourTable[i-1] . Red;
  413.             NewPot -> Green = NewPot -> sGreen = ColourTable[i-1] . Green;
  414.             NewPot -> Blue  = NewPot -> sBlue  = ColourTable[i-1] . Blue;
  415.          }
  416.          else
  417.          {
  418.  
  419.             /* Now we have to combine two pots */
  420.  
  421.             Pot[0] . NumPixels = ColourTable[i] . NumPixels;
  422.             Pot[0] . Red   = Pot[0] . sRed   = ColourTable[i-1] . Red;
  423.             Pot[0] . Green = Pot[0] . sGreen = ColourTable[i-1] . Green;
  424.             Pot[0] . Blue  = Pot[0] . sBlue  = ColourTable[i-1] . Blue;
  425.  
  426.             Dist = 0x7fffffff; /* Largest distance between two colors */
  427.             for(j = NumColours ; j > 0 && Dist; j--)
  428.             {
  429.                for(k = j - 1 ; k >= 0 && Dist ; k--)
  430.                {
  431.                   DistRGB = Pot[k] . Red - Pot[j] . Red;
  432.                   NewDist = DistRGB * DistRGB;
  433.  
  434.                   DistRGB = Pot[k] . Green - Pot[j] . Green;
  435.                   NewDist += DistRGB * DistRGB;
  436.  
  437.                   DistRGB = Pot[k] . Blue - Pot[j] . Blue;
  438.                   NewDist += DistRGB * DistRGB;
  439.  
  440.                   /* If the new color is nearer than the old one, and at
  441.                      least one is not locked
  442.                   */
  443.  
  444.                   if ((NewDist <= Dist) && !(Pot[k] . Locked && Pot[j] . Locked))
  445.                   {
  446.                      NewPot  = &Pot[j];
  447.                      NewPot2 = &Pot[k];
  448.                      Dist = NewDist;
  449.                   }
  450.                }
  451.             }
  452.  
  453.             /* Combine the two */
  454.  
  455.             if (!((NewPot -> Locked) || (NewPot2 -> Locked)))
  456.             {
  457.                pix = (NewPot -> NumPixels  += NewPot2 -> NumPixels);
  458.                NewPot -> Red   = ((NewPot -> sRed   += NewPot2 -> sRed)/pix);
  459.                NewPot -> Green = ((NewPot -> sGreen += NewPot2 -> sGreen)/pix);
  460.                NewPot -> Blue  = ((NewPot -> sBlue  += NewPot2 -> sBlue)/pix);
  461.             }
  462.             else if (NewPot2 -> Locked)
  463.             {
  464.                NewPot -> Red   = NewPot2 -> Red;
  465.                NewPot -> Green = NewPot2 -> Green;
  466.                NewPot -> Blue  = NewPot2 -> Blue;
  467.             }
  468.  
  469.             /* Really insert the new color */
  470.  
  471.             *NewPot2 = Pot[0];
  472.          } /* else */
  473.  
  474.       } /* for i */
  475.  
  476.  
  477. ›1mPicture/Dither›0m
  478.  
  479. Color adapts the ›3mactive picture›0m to the current colors. The Floyd-Steinberg
  480. algorithm is used for this.
  481.  
  482.  
  483. ›1mPicture/Lock Colors›0m
  484.  
  485. A window appears in which colors can be locked. Locked colors are not
  486. changed during ›3mCompute Colors›0m. Only the ›3mcustom›0m method supports this, ›3mMedian›0m
  487. ›3mCut›0m does not care about locked colors.
  488.  
  489.  
  490. ›1mPicture/Change Colors›0m
  491.  
  492. A color requester appears in which the current colors can be changed.
  493.  
  494.  
  495. ›1mPicture/Load Colors›0m
  496.  
  497. Using this menu item you can load colors from any IFF file. So if you want
  498. to ›3madapt›0m your pictures to Workbench's colors, load the file
  499. 'ENV:Sys/Palette.ilbm' and call ›3mDither›0m for every picture that will be shown
  500. on Workbench. To use colors from another screen, you will have to make a
  501. screenshot of it and then load this file.
  502.  
  503.  
  504. ›1mPicture/Save Selected›0m
  505.  
  506. This menu item allows you to save the ›3mactive picture›0m to disk. A
  507. filerequester appears in which you can choose where it should be written to.
  508.  
  509.  
  510. ›1mSettings/SaveIcons?›0m
  511.  
  512. Using this option you can save icons along with settings saved by ›3mSave As›0m.
  513. However these settings cannot be activated by double clicking on the icon.
  514. Instead you must use ›3mProject/Open›0m.
  515.  
  516.  
  517. ›1m Median›0m
  518.  
  519. If this menu item is selected the Median Cut method is used for ›3mcolor›0m
  520. ›3madaption›0m. This method does not support ›3mlocked colors.›0m
  521.  
  522.  
  523. ›1m Custom›0m
  524.  
  525. If this menu item is selected my custom method is used for ›3mcolor adaption.›0m
  526. It does support ›3mlocked colors›0m, but I don't know if it's fast or good.
  527.  
  528.  
  529.   Backprefs.guide.English converted by
  530.   Guide2Doc 1.0 (02-Nov-1993) FreeWare - © Koessi
  531.